package com.ysu.shop.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ysu.shop.pojo.BasePojo;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author 霍京
 * @since 2021-3-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("category")
public class Category extends BasePojo {

    private static final long serialVersionUID = 1L;

    /**
     * 父类别id
     */
    @TableField("parent_id")
    private Integer parentId;

    /**
     * 类别名称
     */
    @TableField("name")
    private String name;

    /**
     * 子类别
     */
    @TableField(exist = false)
    private List<Category> children;
}
